package com.pro.xwt.rest.controller;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.pro.xwt.common.model.RProjEmp;
import com.pro.xwt.common.service.RProjEmpService;
import com.pro.xwt.rest.ResponseResult;

public class RProjEmpController {
	@Autowired
	RProjEmpService rProjEmpService;
	
	/**
	 * 添加模板流程
	 * 
	 * @param  rProjEmp
	 * @return
	 * @see 暂无此操作
	 */
	@RequestMapping(method = { RequestMethod.POST }, value = "")
	@ResponseBody
	public ResponseResult add(@RequestBody  RProjEmp  rProjEmp) {
		rProjEmp.setCreateTime(new Date());
		Integer flag=rProjEmpService.insert(rProjEmp);
		if (flag <= 0) {
			return ResponseResult.fail("插入失败", null);
		}
		return ResponseResult.success("添加资源成功", rProjEmp);
	}
}
